home *** CD-ROM | disk | FTP | other *** search
- Digitized Voice Programmer's Toolkit for the PC
- -----------------------------------------------
-
- Version 2.0
-
- Copyright (c) 1988,1989,1990,1991 Farpoint Software
-
- Toolkit Instructions
-
- ------------------------------------------------------------------------------
-
- ***************************************************************************
- * *
- * As this documentation file is being written, it has been almost two *
- * and a half years since Version 1 was released, and three and a half *
- * years since DIGITS.ARC and HIDI.ARC. I have listened to a fair *
- * amount of user feedback by this time, and feel that I know a little *
- * more about what people want in a product like this one. This release *
- * is an attempt to respond to this feedback. Here are some improvements *
- * you will find from the last version: *
- * *
- * (1) BETTER SOUND QUALITY. Everyone wants better sound. No surprise *
- * here. This toolkit provides a dramatic improvement in output *
- * quality over version 1. This goal took priority over everything *
- * else. If you have version 1, try an A/B comparison. *
- * *
- * (2) DIGITIZER HARDWARE IS AVAILABLE. Many users preferred not to *
- * build the digitizer themselves; unfortunately, Farpoint Software *
- * never manufactured digitizers for commercial sale, making do-it- *
- * yourself the only option. I'm sure a number of potential users *
- * were turned away by this. We have now fixed this problem, at a *
- * significant financial risk. (So buy one!) *
- * *
- * (3) SIMPLER PROGRAMMING INTERFACE. The complexity of using the core *
- * assembly language routines in high-level programs has been *
- * reduced as much as possible. We have also included a true device *
- * driver which allows any program written in any language to output *
- * voice in a manner identical to a simple file write operation. *
- * *
- * And, for balance, here are the things that went away since version 1: *
- * *
- * (1) Background operation and file read-on-the-fly. This was *
- * necessary in order to achieve the desired sound quality *
- * improvement. You can't allow interrupts when sub-microsecond *
- * timing is required. *
- * *
- * (2) Small voice data files. They got bigger. Eight times as big when *
- * uncompressed, four times when using Mu-Law compression. *
- * *
- * *
- * Many thanks to all the honest people who registered for version 1. *
- * Everyone who registered for version 1 is now automatically registered *
- * for version 2. *
- * *
- * - Alan D. Jones *
- * *
- ***************************************************************************
-
- Introduction
- ------------
-
- This toolkit is a combination of software and hardware designed for the
- purpose of mechanizing and simplifying the process by which programmers may
- create digitized voice recordings, store them on disk, edit the voice data
- files, and incorporate digitized voice playback into their own high-level
- language programs.
-
- The recording of digitized voice requires an external hardware device. This
- archive includes the schematic of the device in several files, each
- appropriate for one popular printer type. The device is also available
- directly from Farpoint Software. Note that it is not the same as the digitizer
- used with DVPT version 1. This new digitizer had to be a little more complex
- to accomplish its task.
-
- Playback of the digitized voice, however, requires NO SPECIAL HARDWARE. The
- sound is produced with the built-in speaker provided in nearly all PC's and
- PC-compatible machines. This means that programs may be written for general
- distribution which will play voice messages on the user's machine as it
- exists.
-
- Here is a list of the major features of the current software package:
-
- (1) Operates under the DOS environment.
- (2) Provides a full set of voice record/playback control routines which
- are directly callable from many high-level languages including C
- and Pascal. They are also, of course, callable from assembly language.
- (3) There are no length limitations on either the size of the memory
- buffers or the size of the voice data files on disk other than the
- physical limits of the machine itself. 64k is not a special number.
- (4) A sophisticated voice data file editor is provided. It has moved away
- somewhat from the "tape recorder" model, and now provides a file
- indexing feature that can be used to directly create "sound dictionary"
- files of a format that is relatively easy for the programmer to
- manipulate.
- (5) Several short example programs are included, written in C, which
- demonstrate the use of the calls to the voice modules, both as linked
- object modules as a device driver.
-
-
- Shareware Notice
- ----------------
-
- The Digitized Voice Programmer's Toolkit is released as Shareware. This is
- copyrighted material; it is NOT "free software". You are permitted to
- experiment with this package long enough to determine if it suits your needs,
- but if you will be making use of the material in your own programs, then a
- license fee of $50 is required. NO PROGRAM WHICH MAKES USE OF THE MATERIALS
- IN THIS TOOLKIT MAY BE SOLD COMMERCIALLY, ON A CONTRACT BASIS, OR AS SHAREWARE
- UNLESS THE SELLER HAS PAID THE LICENSE FEE. Please make all checks and/or
- money orders payable to:
-
- Farpoint Software
- 2501 Afton Court
- League City, Texas 77573-3438
-
- If you live in a country other than the United States of America, it will be
- necessary for you to either (1) Use a check drawn on a U.S. bank specified
- in U.S. funds, or (2) Use an "International Money Order", available from most
- banks, once again specified in U.S. funds. When we receive a small check from
- a non-U.S. bank, both banks charge us a "currency conversion fee" that totals
- literally almost as much as the check itself.
-
- For your convenience and our records, a registration/order form is included
- in the file ORDER.FRM.
-
- As a registered user, you will automatically receive software updates as they
- become available. You will also receive the source code to the VDFE editor
- and several experimental voice signal processing and compression programs.
- Registered users, of course, are given priority if programming assistance or
- hardware construction assistance is requested.
-
- You are granted permission to distribute copies of the Digitized Voice
- Programmer's Toolkit, provided that (1) no fee is charged for such copies,
- other that a nominal disk duplication fee, (2) these files are distributed
- in their original, unmodified form, and (3) ALL the files in the original
- archive are included with each copy. (See "List of Files" below.)
-
- If you paid a "disk duplication fee" or other such fee to a distributor of
- public domain and shareware programs, be aware that the payment of this fee
- DOES NOT constitute registration of this Toolkit. Likewise, the payment of a
- fee to any Bulletin Board Service for the time required to download this
- Toolkit DOES NOT constitute registration. Registration occurs only through
- direct interaction with Farpoint Software.
-
- If more information is needed, write or contact Alan D. Jones through
- Compuserve Information Service at user ID 74030,554.
-
- To the people who disseminate and distribute shareware: Do NOT strip out the
- schematic files and distribute this kit without them. This is exactly what
- happened with the last version, causing a lot of confusion and headaches for
- both myself and potential users. Do NOT split this archive into more than one
- file and distribute it in that way, making it almost inevitable that one of
- the files will get lost.
-
-
- List of Files
- -------------
-
- The files included with the Digitized Voice Programmer's Toolkit are:
-
- READ.ME -- introductory note
- VOICEKIT.DOC -- this file
- BUILDIT.DOC -- digitizer construction details and parts list
- VRMOD.DOC -- descriptions of procedure calls in VRMOD.ASM
- VPMOD.DOC -- descriptions of procedure calls in VPMOD.ASM
- ORDER.FRM -- a printable registration form and order form
- PRINTALL.BAT -- prints out all the above files
- ADJUST.EXE -- tool for adjusting and testing the digitizer
- VDFE.EXE -- voice data file editor
- VDFE.HLP -- help file for the voice data file editor
- VRMOD.ASM -- assembly routines providing recording capability
- VRMOD.OBJ -- assembled VRMOD.ASM
- VPMOD.ASM -- assembly routines providing playback capability
- VPMOD.OBJ -- assembled VPMOD.ASM
- VRMOD.H -- include file with C prototypes for VRMOD calls
- VPMOD.H -- include file with C prototypes for VPMOD calls
- VRTEST.C -- simple C program demonstrating how to record
- VRTEST -- make file for VRTEST.C
- VRTEST.EXE -- executable recording program
- VPTEST.C -- simple C program demonstrating playback
- VPTEST -- make file for VPTEST.C
- VPTEST.EXE -- executable playback program
- EMBEDDED.C -- simple C program demonstrating embedded voice
- EMBEDDED -- make file for EMBEDDED.C
- EMB_VOI.VOI -- voice data for EMBEDDED.C
- EMB_VOI.PRE -- prefix file used in assembly file creation
- EMB_VOI.SUF -- suffix file used in assembly file creation
- EMBEDDED.EXE -- executable with embedded voice data
- BIN2ASM.EXE -- binary to DB statement converter
- ULAW.C -- Mu-Law compressor/encoder
- ULAW -- make file for ULAW.C
- ULAW.EXE -- executable Mu-Law compressor/encoder
- UNULAW.C -- Mu-Law decoder
- UNULAW -- make file for UNULAW.C
- UNULAW.EXE -- executable Mu-Law decoder
- FSVPDD.SYS -- voice playback device driver
- VPDDTEST.C -- simple C program demonstrating use of FSVPDD.SYS
- VPDDTEST -- make file for VPDDTEST.C
- VPDDTEST.EXE -- executable using device driver
- DEMO.VOI -- just a sample of recorded voice
- RUN_ME.BAT -- plays the demo
- POSTSCRP.SCH -- schematic for Postscript printer
- HPGL.SCH -- schematic for HPGL plotter
- EPSONFX.SCH -- schematic for Epson FX series printer
- HPLASER.SCH -- schematic for Hewlett-Packard LaserJet printer
- IBMPRO.SCH -- schematic for IBM Proprinter
-
- If you received the Toolkit with any of the above files missing, please
- notify Farpoint Software.
-
-
- Description of Voice Subroutine Modules
- ---------------------------------------
-
- The key software elements in the kit are two assembly language programs,
- VRMOD.ASM and VPMOD.ASM, and their assembled OBJ files. These are not stand-
- alone programs. They are designed to be linked with other programs to provide
- the voice control routines. The calls associated with recording are in
- VRMOD, and the calls associated with playback are in VPMOD. Any given program
- may be linked with either or both of these modules. Typically, a program
- designed for general distribution would be linked only with VPMOD, since
- recording requires the hardware device.
-
- The external hooks to the two modules consist of various "public" procedure
- names. All procedures use the Pascal calling convention, since most high-level
- language compilers can support this calling method. The Pascal calling
- convention has the following meaning:
-
- (1) Procedure names are all caps, and are not preceeded by an underscore.
- (2) Procedures are called with "far" (intersegment) calls.
- (3) Short return values appear in the AX register; long return values
- appear in DX:AX.
- (4) Parameters are pushed onto the stack in left-to-right order; i.e. the
- first parameter in the list is pushed first. If the parameter is a
- doubleword, then the high order word is pushed first.
- (5) The called subroutine is responsible for clearing the parameters from
- the stack upon return.
-
- The above list will be of interest primarily to assembly language programmers.
- When working in a high-level language, it is necessary only to make sure that
- the compiler is using the proper calling method. For C programs, two header
- files have been included. They are VRMOD.H and VPMOD.H. At the beginning of
- any C program that uses the voice playback routines, insert the line:
-
- #include "vpmod.h"
-
- This file contains prototypes of all procedure calls in VPMOD.ASM, declared
- in a way that causes the compiler to generate correct calling code.
-
- The details of how each individual procedure call operates will be found in
- the separate documents VRMOD.DOC and VPMOD.DOC. It is suggested that you
- print these files for use as reference material while writing programs.
-
-
- Example Programs
- ----------------
-
- Note: "Make" files acceptable to Microsoft's NMAKE utility are included
- for all the example programs. The compiler used was the Microsoft
- C Compiler version 6.00A. The assembler was the Microsoft Macro
- Assembler version 5.10. The make files are written to assume that
- the compiler is installed to include the Large model library and
- that the default operating system is "neither". If the compiler
- defaults to DOS, then change the make files so that all occurrences
- of "llibcer" become "llibce".
-
- VRTEST.C (VRTEST.EXE):
- [Related files: VRTEST, VRMOD.H, VRMOD.ASM]
- This program is a simple recorder, written to demonstrate the use of
- procedure calls into VRMOD. To execute the program, first attach the voice
- digitizer to a COM port and turn the device on; then at the DOS prompt
- type:
- VRTEST <port #> <filename>
- For example, to record from COM2 into file TESTFILE.VOI, type:
- VRTEST 1 TESTFILE.VOI
- Recording will begin at the beep. Before recording starts, the program will
- display a message indicating the size in both bytes and seconds of the
- available recording buffer. Recording will continue until either a key is
- pressed or the buffer is full, at which time the buffer will be written to
- disk.
-
- VPTEST.C (VPTEST.EXE):
- [Related files: VPTEST, VPMOD.H, VPMOD.ASM]
- This is the counterpart to VRTEST. It demonstrates the use of procedure
- calls into VPMOD. To execute it, type:
- VPTEST <filename>
- The specified file will be loaded into a memory buffer, then played through
- the speaker. In both this example and VRTEST, messages will be displayed as
- necessary to indicate the meaning of the value returned by the calibration
- procedure.
-
- FSVPDD.SYS:
- This is a true DOS device driver which implements the voice playback
- functions. It calibrates upon initial load, thus removing that
- responsibility from the calling program. The driver occupies about 3.6k
- of memory. To load it, place the following line into the CONFIG.SYS file
- on the boot drive, assuming the driver to be in the VOICE subdirectory on
- drive C:
- DEVICE=C:\VOICE\FSVPDD.SYS
- The driver can then be used by ANY DOS program written in ANY language in
- which files can be opened, written to, and closed. A mechanism is even
- provided for playing buffers larger than 64k in size. To use the driver,
- your program should perform the following actions:
- (1) Open the file FSVPDD$$ and obtain a file handle or number.
- (2) Allocate a buffer large enough to hold the voice data plus 4 bytes.
- (3) Create a 32-bit integer indicating the voice data length in bytes.
- (4) Copy this integer into the first 4 bytes of the allocated buffer.
- (5) Fill the remainder of the buffer with the voice data.
- (6) Perform a FILE WRITE operation to the handle obtained in step 1,
- giving, as the data source, a pointer to the first byte in the
- buffer. IMPORTANT: Pass the value 1 as the number of bytes to be
- written. The driver will take the actual number of bytes from the
- first 4 bytes in the buffer.
- (7) (Optional.) Perform a FILE READ operation, again specifying 1 byte,
- and giving, as the destination, the address of a variable which can
- hold a 32-bit integer. After the read, this integer will contain the
- actual number of bytes played.
- (8) Free the buffer allocated in step 2.
- (9) Close the file handle.
-
- VPDDTEST.C (VPDDTEST.EXE):
- This is an example written in C which uses the device driver FSVPDD.SYS.
- It is the smallest of all the example executables, since the device driver
- handles calibration and playback. The assembly routines do not need to be
- linked to a program which uses the device driver.
-
- EMBEDDED.C (EMBEDDED.EXE):
- [Related files: EMBEDDED, VPMOD.H, VPMOD.ASM, EMB_VOI.VOI,
- EMB_VOI.PRE, EMB_VOI.SUF]
- This is a simple example of the techniques used to embed voice data in an
- executable program. Instead of reading a separate voice file, the voice
- data is part of the EXE file. Note that the "make" file in this case is
- as important to study as the C program. The trick here is to convert the
- raw binary voice data file into an OBJ file that can be fed through the
- linker. This is done in three stages: (1) The file-cruncher program BIN2ASM
- is used to create a file containing only a long list of assembly language
- DB statements equivalent to the binary data; (2) The prefix file EMB_VOI.PRE
- and the suffix file EMB_VOI.SUF are combined with the DB statements to form
- an assembly language module containing all necessary segment brackets and
- public declarations; (3) This module is assembled and linked with the main
- program. The contents of the prefix and suffix files depend on the specific
- application; in this example we use only a single segment and a single
- block of voice data. A more complex program may contain several modules of
- this type or have an assortment of labels within a single module. Since the
- assembler requires segments to be 64k or less, BIN2ASM places a marker
- comment (a semicolon and a string of minus signs) at each 64k boundary in
- its output file. If this happens, you must edit the file to end a segment
- and begin a new one at each of these boundaries.
-
-
- Other Programs
- --------------
-
- ADJUST.EXE:
- The purpose of this program is to facilitate the adjustment and testing of
- digitizer boards. It has no command line parameters; simply type ADJUST to
- start the program. There are three items of interest on the display:
- (1) The COM port to which the digitizer is presumably attached while this
- program runs. Cycle through the ports numbers by pressing <F2> until the
- correct number appears.
- (2) A DC offset meter which indicates the value of the average reading
- from thr A/D converter relative to the "ideal" center point of 80 hex.
- This reading should be adjusted to zero using R24.
- (3) A signal level meter. This shows the instantaneous peak-to-peak
- level being received by the A/D converter. It should be as low as you
- can get it (while not speaking, of course). A reading of 10 to 20 or
- less is considered reasonable. If the reading is higher, then possible
- trouble sources might be: (a) high levels of room background noise from
- things such as fans and air conditioners, (b) powering the digitizer with
- an electrically noisy power supply, (c) poor wiring practices on the
- digitizer or missing bypass capacitors, (d) input gain control R8 set
- too high, or (e) the digitizer may be sitting too near a source of
- radiated electrical noise, such as a switching power supply.
-
- ULAW.EXE:
- This program reduces the size of a voice data file by a 2:1 ratio by
- encoding each 8-bit sample as a 4-bit number such that the quantization
- error is minimized near the equilibrium (silence) point (80 hex) and
- increases with increasing excursion. This is a common practice in telephone
- systems used to reduce data throughput requirements. It causes surprisingly
- little degradation of the sound quality, although there is some. The effect
- of quantizing with this program has been described as a slightly "gritty"
- quality in the reproduced speech. To execute, type:
- ULAW <source filename> <destination filename>
-
- UNULAW.EXE:
- This program is the matching decoder for ULAW described above. Voice data
- files encoded with ULAW cannot be played directly; they must first be
- expanded with UNULAW. The purpose of these two programs is primarily to
- reduce the size of voice data files for modem transfers. To execute, type:
- UNULAW <source filename> <destination filename>
- Source code has been included for both ULAW and UNULAW.
-
- BIN2ASM.EXE:
- This is a program which converts any binary file into a series of DB
- statements which can be inserted into an assembly language program and
- thereby made into an object module. Intended to be used in creating programs
- with internally embedded voice data, its use is demonstrated in EMBEDDED.C.
-
-
- The Voice Data File Editor (VDFE)
- ---------------------------------
-
- This program provides a convenient environment for creating, editing, and
- generally patching together voice data files, and creating index files for
- them. VDFE requires no command line parameters. Upon execution, it displays
- its primary screen and waits for user input. This consists of an assortment
- of single keystroke commands, accessible directly or through a keyboard
- operated pulldown menu system. The editor and its operation are described
- in detail in the file VDFE.HLP; this file can be displayed by pressing the
- <F1> key while executing VDFE.
-
-
- Graphical Print Files
- ---------------------
-
- These files all contain a copy of the schematic of the digitizer. Several
- popular printers are supported. The files are:
-
- Filename Printer/Plotter
- -------- ---------------
- POSTSCRP.SCH Postscript printer
- HPGL.SCH HPGL plotter
- EPSONFX.SCH Epson FX series printer
- HPLASER.SCH Hewlett-Packard LaserJet printer
- IBMPRO.SCH IBM Proprinter
-
- There are some fairly small text strings in the schematic, so all printers
- are used at their highest resolution. To print or plot the schematic, use
- the DOS copy command:
- COPY /B <filename> <output port>
- For example, to print to a LaserJet connected to LPT1:
- COPY /B HPLASER.SCH LPT1
-
-
- General Digitizer Information
- -----------------------------
-
- Every effort has been made to avoid the use of unusual or hard-to-get parts
- in the design of this digitizer. For those who prefer not to build the
- digitizer circuit themselves, it has been made available as a fully built and
- tested board. The "unpopulated" (etched and drilled but no parts) board is
- also available. See the price list near the end of this document for details.
-
- Unlike the digitizer used in DVPT version 1, which digitized its input
- directly into the bitstream to be used during playback, this digitizer is
- a classic 8-bit successive approximation analog-to-digital converter,
- combined with a microphone amplifier, anti-aliasing filter, level indicators,
- sample-and-hold amplifier, and a slightly odd 4-bit wide parallel interface
- to the PC serial port. Other features include a circuit which produces a
- small degree of amplitude compression to improve perceived loudness, an
- input gain control with a 20 decibel range (100:1), a DC offset trim, and
- a remote "stop" switch. The data read from the digitizer is stored as a simple
- list of 8-bit numbers, each indicating the voltage at the time of the sample.
- This storage scheme is commonly called PCM or Pulse Code Modulation.
-
- The interface to the digitizer depends entirely on direct I/O bit manipulation
- of the PC serial port, and does NOT use the receiver serial interrupt. It
- should therefore work equally well connected to any PC serial port, from
- COM1 through COM4. The interconnecting cable must at least connect pins
- 3, 4, 5, 6, 7, 8, 20, and 22. When in doubt, use a full 25-wire "straight
- through" cable; a 2-3-7 or "three-wire" cable will not work. Do not use a
- null modem cable.
-
- The circuit is designed to use a "dynamic" or moving magnetic coil type of
- microphone. Ceramic or piezoelectric (crystal) microphones can also be made
- to work by reducing the setting of the input gain control, but these types
- are often inferior to dynamic microphones. Electret and capacitor microphones
- won't work unless they provide their owm DC biasing. The type of handheld
- microphone that often comes with cheap portable cassette tape recorders is a
- good bet.
-
- The power supply must be a split supply; i.e. a positive voltage and a
- negative voltage (relative to ground) of equal magnitudes. The easiest way
- to accomplish this is to use two 9 volt batteries. The supply must be at
- least (+) and (-) 7.5 volts for the circuit to work. A (+) and (-) 12 volt
- supply can be used as well; however, DON'T use a (+) and (-) 15 volt supply
- or 15 volt batteries, since this is equal to the absolute maximum rating of
- the MC1488 line driver and can easily destroy it. Also, DON'T get the supply
- polarity backwards; if this happens, nearly every semiconductor device on
- the board will be destroyed.
-
- The Signal Level Indicators on the Digitizer
- --------------------------------------------
-
- The LED labelled D8 is the -6 decibel threshold indicator; it lights when the
- signal exceeds one half of the maximum range of the A/D converter. The LED
- labelled D7 is the clipping indicator; it lights when the signal level equals
- or exceeds the maximum range of the A/D converter. The lighting of the
- clipping indicator means that the peaks of the reproduced waveform will be
- clipped or "flat-topped". A small amount of clipping on speech waveforms
- generally does not degrade intelligibility, although it can be psychologically
- irritating if it occurs over a significant portion of the data.
-
- The level indicators are designed to be used in the following way: When
- speaking into the microphone or making a recording from another source, the
- input level (gain) control should be adjusted so that the -6db indicator
- remains lit a large percentage of the time, whereas the clipping indicator
- only flickers on the loudest peaks of the sound. This is the optimum signal
- level. It makes the maximum possible use of the resolution of the A/D
- converter without introducing an undue amount of clipping distortion.
-
-
- Digitizer Schematic Specifics
- -----------------------------
-
- This section describes the signal flow through the digitizer. It's probably
- a good idea to have a printout of the schematic on hand while reading it.
-
- U1:A and U1:D together form a microphone amplifier which provides most of
- the gain of the circuit. Capacitors C3 and C4 give the amplifier a gradual
- low frequency roll-off, experimentally and subjectively determined to
- maximize the intelligibility of the final result. The first stage (U1:A)
- gain can be adjusted with trimpot R8 from a minimum of 1 to a maximum of
- 100 (actually 101, given that the resistors were that accurate). The second
- stage (U1:D) provides an additional fixed gain of 23, for a total maximum
- voltage gain of 2300 for both stages.
-
- U1:C, U1:B, and their associated passive components form a fourth order
- lowpass filter whose cutoff frequency is approximately 7000 Hz. Since the
- software drives the circuit at a conversion (sampling) rate of about
- 16500 Hz, the Nyquist criterion requires that frequencies above half of this
- (8250 Hz) be absent from the analog signal, or aliasing will occur. The
- lowpass filter approaches this situation well enough to eliminate audible
- aliasing effects. A full discussion of aliasing would take quite a bit of
- space and will not be presented here; there are numerous textbooks that cover
- the subject.
-
- R10, R15, D3, D4, D5, and D6 are a crude amplitude (volume) compression
- circuit. The net effect of the circuit is a mild odd-harmonic distortion
- of the waveform which we accept in order to improve its dynamic range. The
- circuit causes the peak-to-peak gain of high-level signals to be less than
- that of low-level signals. This allows us to operate at higher overall input
- levels before severe clipping occurs, causing somewhat improved resolution
- (reduced quantization error) in the lower-volume sounds that contribute so
- much to the perceived "clarity" of a reproduced speech signal. There is also
- an increase in the perceived overall volume at the output.
-
- C5 is a DC blocking capacitor. The appropriate DC offset required by the
- analog-to-digital converter is supplied by R9 and R16 or trimpot R24. D1 and
- D2 protect the circuitry which follows from overvoltages. U5 is a sample-and-
- hold amplifier, whose purpose is to maintain the input signal to the converter
- at a steady voltage during the actual conversion. U6 is an 8-bit successive-
- approximation analog-to-digital (A/D) converter capable of performing one
- conversion every 40 microseconds. Its conversion rate limit is therefore
- 25 KHz, more than sufficient for this application. The 8-bit result is
- multiplexed onto 4 lines by either U4 or U7, and the logic levels are changed
- to RS-232 levels by U3. U8 is an RS-232 receiver used to drive the control
- inputs on U5, U6, U4, and U7.
-
- Dual opamp U2 is used as a visual signal level indicator. The opamps are wired
- as comparators. When the excursion of the signal being fed to U5 goes below
- ground, U2:A triggers, lighting LED D7 to indicate clipping. Note that the
- input signal range of the A/D converter is set up to range from zero volts to
- about 4 volts. The input signal needs to be only at one-half of the clipping
- amplitude in order to trigger U2:B, thus lighting LED D8. One-half amplitude
- equals 6 decibels below clipping.
-
- U9 is a three terminal linear 5 volt regulator. It provides power to the
- ICs which must operate from a regulated 5 volt logic supply (U6, U4, U7, U8).
-
- All the capacitors shown in parallel groups in the lower left area of the
- schematic are power supply bypass capacitors. Their purpose is to provide
- each IC with isolation from the noise induced on the power supply rails by
- the other parts of the circuit. These capacitors should be distributed around
- the board so that each power supply pin of each IC is connected directly to
- a bypass capacitor or a pair of bypass capacitors whose other terminal is
- solidly connected to ground. Components U1, U2, and U5 should have two bypass
- capacitors per power supply pin: one 0.1 uF and one 22 uF tantalum.
-
- There are two locations in the schematic where redundant components are
- shown in order to increase versatility or availability:
- (1) Use EITHER R9 and R16 OR trimpot R24, but not both;
- R24 is recommended.
- (2) Use EITHER U4 OR U7, but not both; selection depends on availability.
-
- See the file BUILDIT.DOC for more construction details and a parts list.
-
-
- Playing Back Through the PC Speaker
- -----------------------------------
-
- The speaker on the PC and its associated driver circuitry is quite simple and
- crude, having been designed primarily for creating single square-wave tones
- of various audio frequencies. This speaker is typically driven by a pair of
- transistors used as a current amplifier which is in turn driven directly by
- the output of a TTL gate. This results in only two possibilities of voltage
- across the voice coil: 0 volts and 5 volts. Any sound to be reproduced by
- this system must be reduced to an approximation in the form of a stream of
- constant-amplitude rectangular pulses of varying duration and frequency.
-
- The exact details of the playback mechanism used in this package is probably
- best studied by looking at the code in VPMOD.ASM. Suffice it to say here that
- instantaneous DC drive voltages to the speaker are simulated by providing an
- alternating series of high and low output pulses such that the ratio of high
- pulses to low pulses averages out to the desired voltage. The lowpass
- filtering required is provided by the human ear and the mechanical limits of
- the speaker. Because of the nature of the speaker drive, the transition
- timings are quantized into discrete equally-spaced time intervals. The
- software has been written to minimize this interval (one NOP instruction)
- and therefore maximize the apparent "DC" resolution. The return value from
- the PCALIBRATE routine contains a "delay counter" value. This value is equal
- to the number of discrete steps available; the faster the computer, the
- greater the number of steps. Any number greater than or equal to 256 produces
- optimum sound reproduction, since this is the resolution at which the sound
-
- was originally recorded. As the number of discrete steps decreases below 256,
- the sound quality degrades steadily, becoming moderately bad at 64. It is at
- this point that the PCALIBRATE routine declares the computer to be too slow.
- This number is reached when the CPU becomes an 8 MHz 286, so your programs
- should be targeted at systems with at least this level of performance.
-
- And yes, if you have already looked, there is indeed self-modifying code in
- VPMOD.ASM. Whatever it takes to get the resolution.
-
-
- Prices for Software and Hardware
- --------------------------------
-
- Registration for Software ------------- $50
-
- Becoming registered gives you a license to use portions of the code
- included with this toolkit in your own programs. It does not grant a
- license to sell any of the complete working programs in this toolkit
- intact as part of another package, with the sole exception of the
- device driver, FSVPDD.SYS. If sold intact as part of another package,
- this device driver may NOT be altered in any way.
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Digitizer: UNREGISTERED users REGISTERED users
- ------------------ ----------------
- Fully complete and tested digitizer
- board with 30 day warranty (does not
- include enclosure, batteries, serial
- cable, or microphone) ---------------------- $79 ----------- $59
-
- Unpopulated digitizer printed circuit
- board only, etched and silkscreened,
- without parts ----------------------------- $21 ----------- $17
-
- Other items:
-
- Schematic paper print ---------------------- $5 ----------- Free
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Incidental hardware: Although we can supply the following items,
- we recommend that you obtain them through your local consumer
- electronics stores and computer stores.
-
- Microphone --------------------------- $19
-
- DB-25 cable -------------------------- $20
-
- DB-9 to DB-25 adapter ---------------- $10
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- NOTICE: Since our manufacturing costs may increase as parts costs increase
- over time, the prices quoted for hardware items are valid only through
- December 1992.
-
- Please address all correspondence to:
-
- Farpoint Software
- 2501 Afton Court
- League City, Texas 77573-3438
-
- FAX: (713) 332-4730 Compuserve ID: 74030,554
-
- If at all possible, use the form created by printing the file ORDER.FRM.
- If you choose to write in the information by hand, please print clearly.
- We have received several registration forms for version 1 which were quite
- difficult to read.
-